//Sat May 14 18:45:13 CDT 2011
#include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <queue>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <ctime>

using namespace std;

class MinimumLiars {
public:
	int getMinimum(vector<int> claim) {
		int N = claim.size();
		for (int i = 0; i <= N; i++) {
			int count = 0;
			for (int k = 0; k < N; k++) {
				if (claim[k] > i)
					count++;
			}
			if (count == i)
				return i;
		}
		return -1;
	}
};

